<?php
/**
 * Projecte
 * 
 * @version 1.0  201204200946
 * @author jferrert@copernic.cat  20/04/2012
 * @copyright Creative commons (by-nc-nd) Reconeixement - NoComercial - CompartirIgual 
 */
?>

<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode     : "textareas",
		language : "ca",
		elements : "missatge",
		theme    : "advanced",
		plugins  : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",	
		 // Theme options
		theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
		//theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true 
	});
</script>

<form id="frm_objectes">
  <ul>
		<li>
			<label for="id"><?php echo _('id'); ?> : </label><?php echo $fila['id']; ?>
				<?php if($editarId) { ?>
					<input type="text" id="id" class="camp_text" name="id" value="<?php echo $fila['id']; ?>">
				<?php } else { ?>
                    <input type="hidden" name="id" value="<?php echo $fila['id']; ?>">
				<?php } ?>
		</li>
		<li>
			<label for="nom_objecte"><?php echo _('nom_objecte') ; ?></label>
			<input type="text" id="nom_objecte"  class="camp_text"
                 name="nom_objecte" value="<?php echo $fila['nom_objecte']; ?>">
		</li>
		<li>
			<label for="comentari"><?php echo _('comentari'); ?></label>
			<textarea id="comentari" name="comentari" style="width:80%"><?php echo $fila['comentari']; ?></textarea>
		</li>
		<li>
			<label for="camps">Selecció</label>
			<select id="camps" onChange="tinyMCE_Paste('comentari',selectedValue('camps'))">
				<option value="{opcio1}">Opcio 1</option>
				<option value="{opcio2}">Opcio 2</option>
				<option value="{opcio3}">Opcio 3</option>
				<option value="{opcio4}">Opcio 4</option>
				<option value="{opcio5}">Opcio 5</option>
				<option value="{opcio6}">Opcio 6</option>
				<option value="{opcio7}">Opcio 7</option>
			</select>
		</li>
		</li>
		<li>
			<label for="minuts"><?php echo _('minuts'); ?></label>
			<table cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td rowspan="2"><input type="text" name="minuts" id="minuts" value="<?php echo $fila['minuts']; ?>" style="width:50px;text-align:right;" /></td>
				<!--	<td><input type="button" value="/\" onclick="this.form.minuts.value++;" style="font-weight:bold;font-size:7px;margin:0;padding:0;width:20px;height:18px;" ></td> -->
					<td><input type="button" value="/\" onclick="javascript:spinner_up('minuts');" style="font-weight:bold;font-size:7px;margin:0;padding:0;width:20px;height:18px;" ></td>
				</tr>
				<tr>
				<!--	<td><input type="button" value="\/" onclick="this.form.minuts.value--;" style="font-weight:bold;font-size:7px;margin:0;padding:0;width:20px;height:18px;" ></td> -->
					<td><input type="button" value="\/" onclick="javascript:spinner_down('minuts');" style="font-weight:bold;font-size:7px;margin:0;padding:0;width:20px;height:18px;" ></td>
				</tr>
			</table>
		</li>
		<li>
			<label for="actiu"></label>
			<input type="checkbox" id="actiu"  name="actiu" <?php echo ($fila['actiu'] == 1? 'checked=\"checked\"' : ''); ?>> <?php echo _('actiu'); ?>
		</li>
		</li>
  </ul>
  <input type="button" value="<?php echo _('acceptar'); ?>" onClick="javascript:getData(<?php echo $scriptAcceptar; ?>,'frm_objectes')" >
  <input type="button" value="<?php echo _('tornar'); ?>"   onClick="javascript:getData(<?php echo $scriptTornar; ?>)">
</form>

